package com.aleaho.cftrack.http.entity;

import android.support.v7.widget.RecyclerView;

import com.google.gson.annotations.SerializedName;

/**
 * Created by Administrator on 2017/9/20.
 */

public class LoginEntity extends BaseEntity {


    /**
     * id : 1
     * username : admin
     * loginUser : {"id":1,"name":"系统管理员","permission":{"id":1,"dutyId":0,"dutyname":"系统管理"},"user_is_active":true,"department":{"id":1,"departmentid":"3401040438","departmentname":"长丰农商银行","description":"总行","parent":null,"full_path":"","deep_level":0,"lat":"32.488284","lng":"117.165992"},"avatar":{"id":2,"image":"/media/user/image/1_AKGiueI.png"}}
     * userToken : {"key":"8ea4e95cad0199034189089ea10bead129c77e93","user":1,"created":"2017-05-18T09:49:37.448000"}
     */

    @SerializedName("id")
    private int id;
    @SerializedName("username")
    private String username;
    @SerializedName("loginUser")
    private LoginUserBean loginUser;
    @SerializedName("userToken")
    private UserTokenBean userToken;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public LoginUserBean getLoginUser() {
        return loginUser;
    }

    public void setLoginUser(LoginUserBean loginUser) {
        this.loginUser = loginUser;
    }

    public UserTokenBean getUserToken() {
        return userToken;
    }

    public void setUserToken(UserTokenBean userToken) {
        this.userToken = userToken;
    }

    public static class LoginUserBean {
        /**
         * id : 1
         * name : 系统管理员
         * permission : {"id":1,"dutyId":0,"dutyname":"系统管理"}
         * user_is_active : true
         * department : {"id":1,"departmentid":"3401040438","departmentname":"长丰农商银行","description":"总行","parent":null,"full_path":"","deep_level":0,"lat":"32.488284","lng":"117.165992"}
         * avatar : {"id":2,"image":"/media/user/image/1_AKGiueI.png"}
         */

        @SerializedName("id")
        private int id;
        @SerializedName("name")
        private String name;
        @SerializedName("permission")
        private PermissionBean permission;
        @SerializedName("user_is_active")
        private boolean user_is_active;
        @SerializedName("department")
        private DepartmentBean department;
        @SerializedName("avatar")
        private AvatarBean avatar;

        public int getId() {
            return id;
        }

        public void setId(int id) {
            this.id = id;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public PermissionBean getPermission() {
            return permission;
        }

        public void setPermission(PermissionBean permission) {
            this.permission = permission;
        }

        public boolean isUser_is_active() {
            return user_is_active;
        }

        public void setUser_is_active(boolean user_is_active) {
            this.user_is_active = user_is_active;
        }

        public DepartmentBean getDepartment() {
            return department;
        }

        public void setDepartment(DepartmentBean department) {
            this.department = department;
        }

        public AvatarBean getAvatar() {
            return avatar;
        }

        public void setAvatar(AvatarBean avatar) {
            this.avatar = avatar;
        }

        public static class PermissionBean {
            /**
             * id : 1
             * dutyId : 0
             * dutyname : 系统管理
             */

            @SerializedName("id")
            private int id;
            @SerializedName("dutyId")
            private int dutyId;
            @SerializedName("dutyname")
            private String dutyname;

            public int getId() {
                return id;
            }

            public void setId(int id) {
                this.id = id;
            }

            public int getDutyId() {
                return dutyId;
            }

            public void setDutyId(int dutyId) {
                this.dutyId = dutyId;
            }

            public String getDutyname() {
                return dutyname;
            }

            public void setDutyname(String dutyname) {
                this.dutyname = dutyname;
            }
        }

        public static class DepartmentBean {
            /**
             * id : 1
             * departmentid : 3401040438
             * departmentname : 长丰农商银行
             * description : 总行
             * parent : null
             * full_path :
             * deep_level : 0
             * lat : 32.488284
             * lng : 117.165992
             */

            @SerializedName("id")
            private int id;
            @SerializedName("departmentid")
            private String departmentid;
            @SerializedName("departmentname")
            private String departmentname;
            @SerializedName("description")
            private String description;
            @SerializedName("parent")
            private Object parent;
            @SerializedName("full_path")
            private String full_path;
            @SerializedName("deep_level")
            private int deep_level;
            @SerializedName("lat")
            private String lat;
            @SerializedName("lng")
            private String lng;

            public int getId() {
                return id;
            }

            public void setId(int id) {
                this.id = id;
            }

            public String getDepartmentid() {
                return departmentid;
            }

            public void setDepartmentid(String departmentid) {
                this.departmentid = departmentid;
            }

            public String getDepartmentname() {
                return departmentname;
            }

            public void setDepartmentname(String departmentname) {
                this.departmentname = departmentname;
            }

            public String getDescription() {
                return description;
            }

            public void setDescription(String description) {
                this.description = description;
            }

            public Object getParent() {
                return parent;
            }

            public void setParent(Object parent) {
                this.parent = parent;
            }

            public String getFull_path() {
                return full_path;
            }

            public void setFull_path(String full_path) {
                this.full_path = full_path;
            }

            public int getDeep_level() {
                return deep_level;
            }

            public void setDeep_level(int deep_level) {
                this.deep_level = deep_level;
            }

            public String getLat() {
                return lat;
            }

            public void setLat(String lat) {
                this.lat = lat;
            }

            public String getLng() {
                return lng;
            }

            public void setLng(String lng) {
                this.lng = lng;
            }
        }

        public static class AvatarBean {
            /**
             * id : 2
             * image : /media/user/image/1_AKGiueI.png
             */

            @SerializedName("id")
            private int id;
            @SerializedName("image")
            private String image;

            public int getId() {
                return id;
            }

            public void setId(int id) {
                this.id = id;
            }

            public String getImage() {
                return image;
            }

            public void setImage(String image) {
                this.image = image;
            }
        }
    }

    public static class UserTokenBean {
        /**
         * key : 8ea4e95cad0199034189089ea10bead129c77e93
         * user : 1
         * created : 2017-05-18T09:49:37.448000
         */

        @SerializedName("key")
        private String key;
        @SerializedName("user")
        private int user;
        @SerializedName("created")
        private String created;

        public String getKey() {
            return key;
        }

        public void setKey(String key) {
            this.key = key;
        }

        public int getUser() {
            return user;
        }

        public void setUser(int user) {
            this.user = user;
        }

        public String getCreated() {
            return created;
        }

        public void setCreated(String created) {
            this.created = created;
        }
    }
}
